import request from '@/utils/request'

export function getOptions(params) {
  return request({
    url: '/admin/theme/getThemeOptions',
    method: 'get',
    params
  })
}

export function getList(params) {
  return request({
    url: '/admin/theme/getList',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: '/admin/theme/addNewTheme',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: '/admin/theme/editTheme',
    method: 'post',
    data
  })
}

export function setStatus(id) {
  return request({
    url: '/admin/theme/status',
    method: 'post',
    data: {
      id: id
    }
  })
}

export function cancelSub(id) {
  return request({
    url: '/admin/subscribe/cancelSub',
    method: 'post',
    data: {
      id: id
    }
  })
}
